-- package config
package = newpackage()
package.name = "gp"
package.kind = "exe"
package.language = "c++"
-- package.objdir = "obj/"
package.config["Debug"].objdir = "obj/Debug"
package.config["Release"].objdir = "obj/Release"


-- package files
package.files = {
    matchrecursive( "src/*.cpp", "include/*.h", "include/*.hpp" ),
}

-- defines
if windows then
    package.defines = { "WIN32", "_WIN32", "_WINDOWS" }
elseif linux then
    package.defines = { "LINUX" }
elseif macosx then
    package.defines = { "MACOSX" }
end

package.config.Debug.defines = { "DEBUG", "_DEBUG", "_STLP_DEBUG" }
package.config.Release.defines = { "NDEBUG", "_NDEBUG" }

-- include paths
if windows then
    package.includepaths = {
        "include",
        "$(OGRE_HOME)/ogremain/include",
    }
elseif linux then
    package.includepaths = {
        "include",
        "/usr/include/OGRE/",
        "/usr/include/OIS/",
    }
elseif macosx then
    package.includepaths = {
        "include",
    }
end

-- library paths
if windows then
    -- windows
    package.libpaths = {
        "$(OGRE_HOME)/lib",
        "$(OIS_HOME)/lib",
    }
    package.config.Debug.libpaths = {

    }
    package.config.Release.libpaths = {

    }
elseif linux then
    -- linux
    local arch = linuxbits == 64 and "amd64" or "x86"
    package.libpaths = {
        "/usr/lib/OGRE/",
    }
    package.config.Debug.libpaths = {

    }
    package.config.Release.libpaths = {

    }
elseif macosx then
    package.libpaths = {
    }
    package.config.Debug.libpaths = {
    }
    package.config.Release.libpaths = {
    }
end

-- linking libs
if windows then
    package.links = {

    }
    package.config.Debug.links = {
        "OgreMain_d",
    }
    package.config.Release.links = {
        "OgreMain",
    }
elseif linux then
    package.links = {
        "OgreMain",
        "OIS",
    }
    package.config.Debug.links = {
    }
    package.config.Release.links = {
        "OgreMain",
    }
elseif macosx then
    package.links = {
        "OIS",
    }
end

-- platform specific compiler options
if macosx then
    package.buildoptions = { "-framework Ogre" }
end

